# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=libzapojit
pkgver=0.0.3_git20190715
# Use git version, latest tarball is 7 years old...
_commit=5a13e732daf08dc28db2133e3d0a1066f3e227bd
pkgrel=0
pkgdesc="GLib/GObject wrapper for the SkyDrive and Hotmail REST APIs"
url="https://gitlab.gnome.org/GNOME/libzapojit"
arch="all !riscv64 !s390x" # gnome-online-accounts-dev
license="LGPL-2.1-or-later"
makedepends="automake autoconf libtool glib-dev json-glib-dev rest-dev libsoup-dev
	gnome-online-accounts-dev gtk-doc gobject-introspection-dev"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc"
source="https://gitlab.gnome.org/GNOME/libzapojit/-/archive/$_commit.tar.gz"
builddir="$srcdir/libzapojit-$_commit"

prepare() {
	default_prepare

	sed '/AX_CHECK_ENABLE_DEBUG/d' -i configure.ac
	aclocal --install --force
	gtkdocize
	autoreconf -fi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="458d4f000adf3bb72bd970134b0b4f59456a37bf6ec445adc76b4ba66be9548bfaa1699e6ae96f363aff904b9d869234892cf927bed4b337a5b2c45acbd518f2  5a13e732daf08dc28db2133e3d0a1066f3e227bd.tar.gz"
